At 4:09 PM -0500 11/9/05, Tom Lane wrote:
>Joel Stevenson <joelstevenson@mac.com> writes:
>> I've been running the setup on 8.1b3 and 8.1RC1 without this
>> particular Assertion failure, but had not been using the NOWAIT flag
>> until today. During a period of perhaps 20 processes operating on
>> the queue it looks like postgres failed this assertion 17 times, the
>> first coming very shortly after the processes began and the rest
>> following in quick succession.
>
>BTW, I imagine that the apparent correlation to NOWAIT is occurring
>because your client-side code was not checking to see if the NOWAIT
>query had failed before trying to launch another query in the same
>transaction.
That is indeed what the code was doing. I'd added NOWAIT to the
SELECT statement and was catching the error that was being thrown
from the NOWAIT behavior, but didn't think that the error would
invalidate the current transaction (which was not a prepared
transaction.) The fact that it does kill the transaction makes
perfect sense. I'd been thinking of NOWAIT all wrong: as a "return
on block", but it's an "error on block".
Thanks again, Tom.
-Joel